#ifndef TYPES_H
#define TYPES_H

#include <sparrow/stable.h>

typedef std::vector<uint8_t> Octets;

class Slice
{
    public:
        Slice(const Octets &buffer, 
            Octets::const_iterator begin, 
            Octets::const_iterator end);
        Slice();
        const Octets &buffer() const;
        const Octets::const_iterator &begin() const;
        const Octets::const_iterator &end() const;
        size_t size() const;

    private:
        void validate () const;
        const Octets *buffer_;
        Octets::const_iterator begin_;
        Octets::const_iterator end_;
};

#endif // TYPES_H

